<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Service extends Model
{
    protected $guarded  = ['id'];

    public function type()
    {
    	return $this->belongsTo(ServiceType::class,'service_type_id');
    }

    public function getPriceTypeTxtAttribute()
    {
    	return $this->price_type==1?'作业定价':'工时定价';
    }
}
